package com.xin.di.uav.applet.rest;

import com.xin.di.uav.applet.service.WxAppletService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * @author ltq
 */
@RestController
public class WxAppletRest {
    @Autowired
    private WxAppletService wxAppletService;

    /**
     * 发送订阅消息
     *
     * @param accessToken
     * @param templateId
     * @param openId
     * @param data
     */
    public void subscribeSend(String accessToken, String templateId, String openId, HashMap data, String pageUrl) {
        wxAppletService.subscribeSend(accessToken, templateId, openId, data, pageUrl);
    }


    public Object addressIdentify(String addressText) {
        return wxAppletService.addressIdentify(addressText);
    }


    public Object checkSign(String qkPhone, String sign, Long timeStamp, String nonce) {
        return wxAppletService.checkSign(qkPhone, sign, timeStamp, nonce);
    }

    public Object getSign(String qkPhone, String sign, Long timeStamp, String nonce, String userId) {
        return wxAppletService.getSign(qkPhone, sign, timeStamp, nonce, userId);
    }

    public Object getSignInfo(String qkPhone, String sign, Long timeStamp, String nonce) {
        return wxAppletService.getSignInfo(qkPhone, sign, timeStamp, nonce);
    }

    public Object wxPay(String params) {
        return wxAppletService.wxPay(params);
    }
}
